package com.haohan.stock.vo;

import java.util.List;

public class MysqlPage<T> {

	private long totalElements;// 总条数
	private long totalPages;// 总页数
	private Integer pagenumber = 1;// 当前页
	private Integer pagesize = 10; // 当前页面条数
	private List<T> data;
	private T t;
	private Integer offset =0;//数据偏移量
	
	public Integer getOffset() {
		return offset;
	}

	public void setOffset(Integer offset) {
		this.offset = offset;
	}

	public T getT() {
		return t;
	}

	public void setT(T t) {
		this.t = t;
	}

	public long getTotalElements() {
		return totalElements;
	}

	public void setTotalElements(long totalElements) {
		this.totalElements = totalElements;
	}

	public long getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(long totalPages) {
		this.totalPages = totalPages;
	}

	public Integer getPagenumber() {
		return pagenumber;
	}

	public void setPagenumber(Integer pagenumber) {
		this.pagenumber = pagenumber;
	}

	public Integer getPagesize() {
		return pagesize;
	}

	public void setPagesize(Integer pagesize) {
		this.pagesize = pagesize;
	}

	public List<T> getData() {
		return data;
	}

	public void setData(List<T> data) {
		this.data = data;
	}

	public int initPagenumber() {
		return (getPagenumber() - 1) * getPagesize();
	}
}
